﻿using System;
using System.Windows.Forms;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace HYElectricSetting
{
	[Regeneration(RegenerationOption.Manual)]
	[Transaction(TransactionMode.Manual)]
	public class CmdLightningSetting : IExternalCommand
	{
		public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			Document document = commandData.Application.ActiveUIDocument.Document;
			HYElectricSettingMainForm hyelectricSettingMainForm = new HYElectricSettingMainForm(document, "LightningLine");
			DialogResult dialogResult = hyelectricSettingMainForm.ShowDialog();
            return (dialogResult != DialogResult.OK) ? (Result)1 : (Result)0;
		}
	}
}
